<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name=renderer content=webkit>
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>nw核心框架</title>
    <!-- nw核心框架 -->
    <script src="../nwqd.js"></script>
    <script src="zhi.js"></script>
    <script src="pz.js"></script>
</head>

<script>
    function _xt_nw_qd0() {
        // let bd = nw.znbd.cj('tjyh1');
        let gt = nw.znbd.cj('znbd123');
        // gt.jiazaiPZ('./pz.json', 'get')//智能表单的配置
    }

    function wo_hy_qc() {
        console.log(nw.gj.hqZT_fxk_dxk('yh_qc', 1, 1));
    }
    function wo_wjsc() {
        let wj = nw.ff.yc.cjWJ('yh_wj2', 'zsxx', '/');
        //加入白名单
        wj.bmd_lx('doc,docx,txt,pdf') //类型-只录入了小部分。暂时建议用后缀的方式
        wj.bmd_hz('xls,xlsx,zip,tar.gz') //后缀
        wj.wjcc(10)//单位是m
        wj.qd0(scjg);
    }
    function scjg(a, dx) {
        let xx = '';
        switch (a) {
            case -3: xx = '校验不过'; break;
            case -2: xx = '没有可上传的文件'; break;
            case -1: xx = '上传异常'; break;
            case 0: xx = '上传失败'; break;
            case 1: xx = '上传成功'; break;
        }
        console.log(dx)
        nw.ck.ts.cg(xx + '', 'sz')
    }
</script>

<style>
    table tr {
        border: steelblue 1px solid;
    }

    table td {
        border: steelblue 1px solid;
        padding: 0px;
        margin: 0px;
    }
</style>

<body>
    <!-- 本地配置-js方式 pz='js对象'  。远程加载json数据方式 pz2='请求路径' 。两者都存在时，以js的方式生效。-->
    <buju xddw='zzj' g='450' k='500' l='1' znbd='znbd123' pz='znbd_yh_pz' pz2='./pz.json' fwfs='get'>
        <buju g='27' k h='1' l='1' style="background-color:lightgreen ;">
            <buju xddw='zzj'>《添加》</buju>
        </buju>
        <buju g='zd' k h='2' l='1'>
            <table>
                <tr>
                    <td style="width:60px;">用户名</td>
                    <td><input type="TEXT" name="yh_ming" pz='wb ,cd=1 [ht]' style="width: 97%;height:100%;"
                            placeholder="请输入用户名" />
                    </td>
                    <td style="width:230px;"></td>
                </tr>
                <tr>
                    <td style="width:60px;">年龄</td>
                    <td><input type="text" name="yh_nl" pz='sz ,cd=0-3' style="width: 97%;height:100%;" />
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td style="width:60px;">婚姻</td>
                    <td>
                        <select name="hy_hy" id="hy_hy">
                            <option>请选择</option>
                            <option value="0">未婚</option>
                            <option value="1">已婚</option>
                        </select>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td>内容</td>
                    <td><textarea type="text" name="yh_nr" pz='zw ,cd=0' style="width:99%; height: 100%;"></textarea>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td>图片</td>
                    <td>
                        <input type="image" name="yh_tp" value="" />
                        <input type="file" name="yh_tp2" id="yh_tp2" />
                    </td>
                    <td>
                        <nr id="zsxx_tp" k>22</nr>
                    </td>
                </tr>

                <tr>
                    <td>文件</td>
                    <td>
                        <input type="text" name="yh_wj" id="yh_wj" disabled />
                        <input type="file" name="yh_wj2" id="yh_wj2" />
                        <aj ys='tj,g=24' sb_dj='wo_wjsc()'>文件上传</aj>
                    </td>
                    <td>
                        <nr id="zsxx" k>22</nr>
                    </td>
                </tr>

                <tr>
                    <td>声音</td>
                    <td><audio controls="controls" name="yh_sy"></audio></td>
                    <td>2</td>
                </tr>
                <tr>
                    <td>爱好</td>
                    <td>
                        <input type="checkbox" name="yh_ah" value="1" />电子1 ,
                        <input type="checkbox" name="yh_ah" value="2" />电子2 ,
                        <input type="checkbox" name="yh_ah" value="3" />电子3
                    </td>
                    <td></td>
                </tr>

                <tr>
                    <td>起床</td>
                    <td><input type="radio" name="yh_qc" value="0" id='csZJ' onchange="wo_hy_qc()" />睡，
                        <input type="radio" name="yh_qc" value="1" onchange="wo_hy_qc()" />醒
                    </td>
                    <td></td>
                </tr>
            </table>
        </buju>
        <buju g='35' k h='3' l='1' style="background-color:lightgreen ;">
            <buju xddw='zzj,50' g='27'>
                <aj ys='xg' ajlb='cz'>重置</aj>
                <aj ys='tj' ajlb='sq' sb_dj='wo_znbd_tj'>上传</aj>
            </buju>
        </buju>
    </buju>
    22
</body>

</html>